//
//  UpdateHouseViewController.m
//  YaDiuDiu
//
//  Created by 欧洪飞 on 2017/8/23.
//  Copyright © 2017年 jy. All rights reserved.
//

#import "UpdateHouseViewController.h"

#import "FirstView.h"
#import "SecondView.h"
#import "ThreeView.h"
#import "FourView.h"
@interface UpdateHouseViewController (){
    UIScrollView *sclView;
}

@end

@implementation UpdateHouseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setBGColor];
    [self showNav:@"修改"];
    
    [self loadUI];
}

- (void)loadUI{
    sclView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 64, ScreenWidth, ScreenHeight-64)];
    sclView.backgroundColor = COLOR_RGB(242, 242, 242, 1);
    sclView.contentSize = CGSizeMake(ScreenWidth, 1417);
    [self.view addSubview:sclView];
    
    UIView *v1 = [[[NSBundle mainBundle] loadNibNamed:@"FirstView" owner:nil options:nil] lastObject];
    v1.frame = CGRectMake(0, 0, ScreenWidth, 200);
    [sclView addSubview:v1];
    
    
    UIView *v2 = [[[NSBundle mainBundle] loadNibNamed:@"SecondView" owner:nil options:nil] lastObject];
    v2.frame = CGRectMake(0, v1.frame.size.height+v1.frame.origin.y+10, ScreenWidth, 300);
    [sclView addSubview:v2];
    
    UIView *v3 = [[[NSBundle mainBundle] loadNibNamed:@"ThreeView" owner:nil options:nil] lastObject];
    v3.frame = CGRectMake(0, v2.frame.size.height+v2.frame.origin.y+10, ScreenWidth, 293);
    [sclView addSubview:v3];
    //500+293+534+50+40
    UIView *v4 = [[[NSBundle mainBundle] loadNibNamed:@"FourView" owner:nil options:nil] lastObject];
    v4.frame = CGRectMake(0, v3.frame.size.height+v3.frame.origin.y+10, ScreenWidth, 534);
    [sclView addSubview:v4];
    
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    btn.backgroundColor = [UIColor redColor];
    btn.frame = CGRectMake(0, v4.frame.size.height+v4.frame.origin.y+10, ScreenWidth, 50.0);
    [btn setTitle:@"确定修改" forState:UIControlStateNormal];
    [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [sclView addSubview:btn];
    
}

-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    [[UIApplication sharedApplication].keyWindow endEditing:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
